/*
 * @Date: 2023-10-18 14:56:15
 * @LastEditTime: 2023-10-18 16:25:48
 */
/**
 * 系统登录
 */
import utils from 'service/utils';
import fetch from 'service/fetch';
import $ from 'jquery';
import moment from 'moment';
/* ============================== */
let baseurl = 'https://hd.gf.com.cn/api/safe';
if (process.env.NODE_ENV !== 'production') {
    baseurl = 'https://pa.wufae.com';

}

/* ========================== */
//$.get(baseurl+'views');
/* ========================== */
var wxConfigUrl = baseurl + 'jssdk';
export default {
    baseurl,
    getcode() {
        return fetch(baseurl + '/front/valid', { type: 'get' });
    },
    valid(data) {
        return new Promise((resove, reject) => {
            $.ajax({
                url: baseurl + '/front/valid',
                dataType: 'json',
                data: JSON.stringify(data),
                contentType: 'application/json',
                type: 'POST',
                headers: {
                    'SESSIONKEY': painter.sessionKey
                },
                success(res) {
                    resove(res)
                },
                fail(res) {
                    reject(res)
                }
            })
        })
    }
};